﻿@using mscook.mvc;
@model IEnumerable<mscook.core.domain.CookBook>

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3>新闻</h3>
    <div class="control-group">
        <label class="control-label">标题</label>
        <div class="controls">
            <form class="searchForm">
                <div class="input-prepend">
                    <input type="text" name="cookBookName" />
                </div>
                <button class="btn btn-primary search" data-link-btn="@ViewData["linkBtn"]">搜索</button>
            </form>

        </div>
    </div>



</div>
<div class="modal-body">

    <fieldset>

        <table class="table table-striped table-bordered bootstrap-datatable datatable">
            <thead>
                <tr>
                    <th>书名</th>
                    <th>作者</th>
                    <th>所需积分</th>
                    <th>Action</th>
                </tr>
            </thead>
            <tbody>
                @for (int i = 0; i < Model.Count(); i++)
                {
                    var item = Model.ElementAt(i);
                    var isNull = item.Chef == null;
                    <tr>
                        <td>@Html.Encode(item.Name)</td>
                        <td>@Html.Encode(isNull ? "" : item.Chef.Name)</td>
                        <td>@Html.Encode(item.AbsBonus)</td>
                        <td class='center'><a href="#" class="btn btn-success"  data-name="@item.Name" data-id="@item.Id"><i class='icon-zoom-in icon-white'></i>Select</a></td>
                    </tr>
                }
            </tbody>
        </table>
        @Html.Partial("_ModalPageBreak")
    </fieldset>
</div>
<div class="modal-footer">

    <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
</div>
@Html.Partial("_ModalSelect")